Skip to content

Unit 9: footer, about page, and analytics dispatcher refactor#11

Open
stradichenko wants to merge 1 commit intomainfrom
unit-09-footer-about-analytics
Open

Unit 9: footer, about page, and analytics dispatcher refactor#11
stradichenko wants to merge 1 commit intomainfrom
unit-09-footer-about-analytics

Conversation

@stradichenko
Copy link
Copy Markdown
Owner

Summary

  • analytics.html: replace 5 unconditional sub-partial calls with a single provider dispatcher driven by site.Params.analytics.provider, wrapped in partialCached. Provider sub-partials are also cached, keyed on provider name.
  • footer.html: stop loading footer.css here (Unit 6 bundles it via head/styles.html). Lowercase site.Params throughout. Replace now.Year with time.Now.Year. Add aria-hidden + focusable="false" to inline social SVGs. Render customText as plain text by default; opt in to safeHTML via site.Params.footer.allowHTML = true.
  • about.html: lowercase site.Params; i18n NoSocialLinks / NoInterests / Interests with English fallback via | default. Add a TODO marker for Unit 12 (zipfs-law CSS will move into the widget refactor).
  • about-profile.css: append the .about-section h1 rule that was inline in about.html.

Test plan

  • Footer HTML contains exactly one footer.css link (Unit 6 owns the bundle).
  • About page has no inline <style>.
  • When site.Params.analytics.provider = "plausible", only the plausible partial is rendered.

Part of the PKB-theme modernization batch (15 units).

- analytics.html: replace 5 unconditional sub-partial calls with a single
  provider dispatcher driven by site.Params.analytics.provider, wrapped in
  partialCached. Provider sub-partials are also cached, keyed on provider name.
- footer.html: stop loading footer.css here (Unit 6 bundles it via
  head/styles.html). Lowercase site.Params throughout. Replace now.Year with
  time.Now.Year. Add aria-hidden + focusable=false to inline social SVGs.
  Render customText as plain text by default; opt in to safeHTML via
  site.Params.footer.allowHTML = true.
- about.html: lowercase site.Params; i18n NoSocialLinks / NoInterests /
  Interests with English fallback via | default. Add a TODO marker for
  Unit 12 (zipfs-law CSS will move into the widget refactor).
- about-profile.css: append the .about-section h1 rule that was inline
  in about.html, keeping the same selector so the page renders identically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant